<template>
  <div class="all">
    <el-dialog
    title="账号详情编辑"
    :visible.sync="edit_acco"
    width="30%"
    :before-close="handleClose">
    <div class="oneofdetail">
        账号操作记录：
        <div class="textarea">
          <el-input
            type="textarea"
            :rows="10"
            placeholder="请输入内容"
            v-model="detail">
          </el-input>
        </div>
      </div>
    <div class="oneofdetail">
      客户号：
      <div class="input">
        <el-input v-model="client_number" placeholder="请输入内容"></el-input>
      </div>
    </div>
    <div class="oneofdetail">
      电话：
      <div class="input">
        <el-input v-model="phone" placeholder="请输入内容"></el-input>
      </div>
    </div>
    <div class="oneofdetail">
      项目：
      <div class="input">
        <el-input v-model="project" placeholder="请输入内容"></el-input>
      </div>
    </div>
    <div class="oneofdetail">
      是否使用：
      <div>
        <el-select v-model="value" placeholder="请选择">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value">
          </el-option>
        </el-select>
      </div>
    </div>
    <div class="oneofdetail">
      是否持仓：
      <div>
        <el-select v-model="value" placeholder="请选择">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value">
          </el-option>
        </el-select>
      </div>
    </div>
    <div class="oneofdetail">
      持仓组合：
      <div class="input">
        <el-input v-model="portfolios" placeholder="请输入内容"></el-input>
      </div>
    </div>
    <div class="oneofdetail">
      portfolioID：
      <div class="input">
        <el-input v-model="portfolio_id" placeholder="请输入内容"></el-input>
      </div>
    </div>
    <div class="oneofdetail">
      账号风险类型：
      <div class="input">
        <el-input v-model="risk_type" placeholder="请输入内容"></el-input>
      </div>
    </div>
    <div class="oneofdetail">
      可用现金：
      <div class="input">
        <el-input v-model="cash" placeholder="请输入内容"></el-input>
      </div>
    </div>
    <div class="oneofdetail">
      环境：
      <div class="input">
        <el-input v-model="env" placeholder="请输入内容"></el-input>
      </div>
    </div>
    <div class="oneofdetail">
      登录密码：
      <div class="input">
        <el-input v-model="login_pd" placeholder="请输入内容"></el-input>
      </div>
    </div>
    <div class="oneofdetail">
      交易密码：
      <div class="input">
        <el-input v-model="trade_pd" placeholder="请输入内容"></el-input>
      </div>
    </div>
    <div class="oneofdetail">
      验证码：
      <div class="input">
        <el-input v-model="check_code" placeholder="请输入内容"></el-input>
      </div>
    </div>
    <div class="oneofdetail">
      邮箱：
      <div class="input">
        <el-input v-model="email" placeholder="请输入内容"></el-input>
      </div>
    </div>
    <span slot="footer" class="dialog-footer">
      <el-button @click="click_btn">取 消</el-button>
      <el-button type="primary" @click="click_btn">确 定</el-button>
    </span>

  </el-dialog>
  </div>
</template>

<script>
export default {
  name: 'AccountDetail',
  props: {
    editbool: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {

      client_number: 100012345,
      phone: 18112342222,
      project: '中信智投',
      flag_usage: 'yes',
      create_time: '2022-04-14 15:16:54',
      is_hold: 'yes',
      portfolios: '进取型组合',
      portfolio_id: '90234',
      risk_type: '进取型',
      cash: 123400,
      env: 'sit',
      login_pd: 'qwert123',
      trade_pd: '321321',
      check_code: '123456',
      email: 'haifeng.he@magnumwm.com',
      detail: `2022-01-01: 首次购买10w进取型组合首次购买10w进取型组合首次购买10w进取型组合首次购买10w进取型组合首次购买10w进取型组合首次购买10w进取型组合；
2022-01-03: 完成持仓；
2022-01-05：部分赎回3w；
2022-01-06：完成赎回；
2022-01-08：部分赎回3w；
2022-01-09：完成赎回；
2022-01-08：部分赎回3w；
2022-01-09：完成赎回；`,
      edit_acco: this.editbool,
      value: '',
      options: [{
        value: 'yes',
        label: '已使用'
      },
        {
          value: 'no',
          label: '未使用'
        }]
    }
  },
  watch: {
    editbool(newval, oldval){
      this.edit_acco = newval
    }
  },
  methods:{
    click_btn(){
      this.edit_acco = false;
      this.$emit('single_events',this.value);
    },
    handleClose(done) {
      this.$confirm('确认关闭？')
        .then(_ => {
          done();
          this.edit_acco = false;
          this.$emit('single_events',this.value);
        })
        .catch(_ => {});
    }
  }
}
</script>

<style scoped>
.textarea{
  width: 100%;
}
.input{
  width: 40%;
}
.oneofdetail{
  margin-bottom: 10px;
}
.all{

}
</style>
